#include <graphics/SubMesh.h>

namespace ne
{
    SubMesh::SubMesh(const std::string &name)
        : Object(name)
    {
    }

    size_t SubMesh::getSize() const
    {
        if (mpIndexData.notNull())
        {
            return mpIndexData->getSize();
        }
        return 0;
    }

    void SubMesh::setIndexData(const IndexDataPtr &pIndexData)
    {
        mpIndexData = pIndexData;
    }

    IndexDataPtr SubMesh::getIndexData() const
    {
        return mpIndexData;
    }

    void SubMesh::setMaterial(const MaterialPtr &pMaterial)
    {
        mpMaterial = pMaterial;
    }

    MaterialPtr SubMesh::getMaterial() const
    {
        return mpMaterial;
    }

    SubMesh::~SubMesh()
    {
    }
}
